//
//  Warrior.h
//  FrameWork
//
//  Created by Eagle on 6/10/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "cocos2d.h"
#import "Parameter.h"
#import "MapManager.h"
#import "Enemy.h"

enum EWarriorState
{
	WARRIOR_STAND = 0,
	WARRIOR_RUN,
	WARRIOR_ATTACK,
	WARRIOR_SHIFA,
};




enum EWarriorSkill 
{
	SKILL_BAGUA = 0,
	SKILL_LUOLEI,
	SKILL_TOUQU,
	SKILL_HUOQIANG
};



@interface Warrior : CCSprite {
	//等级
	int _level;
	//经验
	int _exp;
	//升级所需经验
	int _levelExp;
	//攻击动画时间,挥刀时间
	int _aniTime;
	//攻击间隔
	int _interval;
	//攻击半径
	float _attackRadius;
	//警戒半径
	float _guardRadius;
	//移动速度
	float _speed;
	//攻击力
	float _attack;
	//状态
	int _state;
	//攻击目标
	Enemy *_target;
	
	
	
	//攻击计时
	int _frame;
	
	//终点位置
	Location *_end;
	
	
	//上一次位置
	Location *_location;
	
	//下一步位置
	Location *_nextLocation;
	
	//技能
	
	//技能1
	EWarriorSkill _skill1;
	//技能2
	EWarriorSkill _skill2;
	//技能3
	EWarriorSkill _skill3;
	//技能4
	EWarriorSkill _skill4;
	
	
	//方向 1右边   2上边   3下边     4左边
	int _direction;
	
	//是否处理暴怒状态
	BOOL _isAngery;
	
	//暴怒状态还剩下几次攻击
	int _angeryTimeLeft;
}

@property (nonatomic, assign) int level;
@property (nonatomic, assign) int exp;
@property (nonatomic, assign) int levelExp;
@property (nonatomic, assign) int aniTime;
@property (nonatomic, assign) int interval;
@property (nonatomic, assign) float attackRadius;
@property (nonatomic, assign) float guardRadius;
@property (nonatomic, assign) float speed;
@property (nonatomic, assign) float attack;
@property (nonatomic, assign) int state;
@property (nonatomic, retain) Enemy* target;

@property (nonatomic, assign) int frame;

@property (nonatomic, retain) Location* end;
@property (nonatomic, retain) Location* location;
@property (nonatomic, retain) Location* nextLocation;

@property (nonatomic, assign) int direction;

@property(nonatomic, assign) BOOL isAngery;
@property(nonatomic, assign) int angeryTimeLeft;

-(void)levelUp;

@end


@interface Guanyu : Warrior
{
	
}


+(id)warrior;






@end




















